@extends('lay.layout')
@section('content')
    <div class="seckill-detail width">
        <div class="article">
            <h1>【{{$data->shopname}}】{{$data->goodstitle}}</h1>
            <h2><span>发表于{{$data->created_at}}</span></h2>
            <div class="wxqq">
                <div>
                    {!! $data->content !!}
                </div>
                <span></span>
                <div>
                    <h3>朋友圈文案</h3>
                    <div class="descr" style="width:100%">
                        {!! $data->friends !!}
                    </div>
                </div>
            </div>
        </div>
        <div class="sidebar">
            <div class="author">
                <div class="figure"><img src="{{user_image_url($user->avatar)}}" style="width: 45px;height: 45px"></div>
                <div class="nickname">{{$user->username}}</div>
                <div class="team">{{$user->signature}}</div>
                <div class="score">
                    <div>
                        <p>{{$statistics['user_time']}}天</p>
                        <p>入驻时间</p>
                    </div>
                    <i></i>
                    <div>
                        <p>{{$user->integral}}</p>
                        <p>信用积分</p>
                    </div>
                </div>
                <div class="btn">
                    <a target="_blank" href="{{route('userhome',['userid'=>$user->id])}}">Ta的主页</a>
                    <a href="#" id="userContact">联系Ta</a>
                    <div class="userauthinfo" id="contactBox"
                         style="margin-top: 35px; top:210px;width:255px;z-index:10;left:75px;">
                        <p>QQ：{{$user->qq}}</p>
                    </div>
                </div>
            </div>
            <div class="product">
                <div class="cover">
                    <a href="{{$data->goodslink}}" target="_blank"><img
                                src="{{all_image_url(json_decode($data->coverimage)->main)}}"
                                alt="{{$data->goodstitle}}"></a>
                </div>
                <div class="content">
                    <div class="copyText" style="width: 1px;height: 1px;overflow: hidden;"><img  style="width: 155px;height: 220px"
                                src="{{all_image_url(json_decode($data->copywritingimage)->first)}}"></a>{{$data->goodstitle}}
                        <br/>原价【{{$data->origprice}} 元】券后【{{$data->voucherprice}}元】<br/>领券：{{$data->couponlink}} <br/>抢购：{{$data->goodslink}}
                        <br/>{{json_decode($data->copywriting)->first}}</div>
                    <h1 class="title">{{$data->goodstitle}}</h1>
                    <div class="line">
                        <div style="width:{{$data->coupontotal==0?0:(intval($data->coupontotal-$data->couponremain)/$data->coupontotal*100)}}%"></div>
                    </div>
                    <div class="sales">
                        <div>券后<span>￥<b>{{$data->voucherprice}}</b></span></div>
                        <p>月销：{{$data->monthsales}}</p>
                    </div>
                    <div class="fee">佣金：
                        @if($data->commissiontype==1) 通用
                        @elseif($data->commissiontype==2)定向
                        @elseif($data->commissiontype==3)鹊桥
                        @elseif($data->commissiontype==4)营销
                        @endif<b>{{$data->commissionrate}}%</b>
                    </div>
                    <div class="coupon">
                        <div onclick="window.open('{{$data->couponlink}}')" style="cursor:pointer">
                            <span>{{(int)$data->couponmoney}}元</span>
                        </div>
                        <p>
                        <span>@if($data->shoptype==2)<img src="/assets/images/icon-tmall.png" alt="tmall">
                            @elseif($data->shoptype==1)<img src="/assets/images/taobao.png" alt="taobao">
                            @endif</span>
                            <span>@if($data->activitytype==2)<img src="/assets/images/icon-qiang.png" alt="tmall">
                                @elseif($data->activitytype==1)<img src="/assets/images/ju.png" alt="juhuasuan">
                                @endif</span>
                        </p>
                    </div>
                    <div class="btn oneSecKillCopy">复制文案</div>
                </div>
            </div>
        </div>
    </div>
@endsection